package com.yz.common.resp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:同用返回类
 * User:Mr.Du
 * Date:2024/3/21
 * Time:00:00
 */
@NoArgsConstructor
@Data
public class BaseResponse<T> implements Serializable {

    private int code;

    private T data;

    private String message;

    public BaseResponse(int code, T data, String message) {
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public BaseResponse(int code, T data) {
        this(code, data, "");
    }

    public BaseResponse(int code, String message) {
        this(code, null, message);
    }


}

